-- GENERATED SPELL FOR [Corrupted Fire Elemental] --


function spell0_21706(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21706', 3000, 1)
end

function spell1_21706(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(35194,pUnit)
pUnit:RegisterEvent('Sorts_21706', 534, 1)
end

function Sorts_21706(pUnit, Event)
local choix_sorts_21706 = math.random(0, 1)
if choix_sorts_21706 == 0 then
pUnit:RegisterEvent('spell0_21706', 1, 1)
end
if choix_sorts_21706 == 1 then
pUnit:RegisterEvent('spell1_21706', 1, 1)
end
end

function mob21706_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21706', math.random(1500, 3000), 1)
end

function mob21706_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21706_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21706_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21706, 1, 'mob21706_Action')
RegisterUnitEvent(21706, 2, 'mob21706_Leave')
RegisterUnitEvent(21706, 3, 'mob21706_Kill')
RegisterUnitEvent(21706, 4, 'mob21706_Die')
